#!/usr/bin/python3
# -*- coding:utf-8 -*-
"""
    将Student的gender属性改为枚举类
"""
from enum import Enum, unique


@unique
class Gender(Enum):
    Male = 0
    Female = 1


class Student(object):

    def __init__(self, name, gender):
        self.name = name
        self.gender = gender


def main():
    wn = Student('wangnan', Gender.Female)
    print(wn.gender)
    print(wn.gender.value)


if __name__ == "__main__":
    main()
